﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace COM.CK
{
    class Program
    {
        static void Main(string[] args)
        {
            ComPortTransport comPortTransport = new ComPortTransport();
            comPortTransport.Initialize("COM4");
            int count = 1;
            model.uart_dis_data[] dd = new model.uart_dis_data[count];
            Thread.Sleep(6000);
            for (int i = 1; i <= 15; i++)
            {
                Int16 total = 0;
                Int16 address =(Int16) 1;
                byte led_rgb =(byte) i;
                dd[0].dis_type = led_rgb;
                dd[0].ele_id = address;
                dd[0].little_ele_id = 0;
                dd[0].order =1;
               // dd[0].port = "COM1";
                dd[0].receive_count = 0;
                dd[0].send_count = i;
                dd[0].state = 1;
                ComPortTransport.COMPORT_CONTROLLER.write_dis_comment(dd);
                Thread.Sleep(3000);
            }
            Thread.Sleep(100000);
        }
    }

}
